package com.ushare.servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;



/**
 * Servlet implementation class for Servlet: IndexServlet
 * Va
 */
 public class IndexServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#HttpServlet()
	 */
	public IndexServlet() {
		super();
	}   	
	
	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		this.doMain(request,response);
	}  	
	
	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		this.doMain(request,response);
	}   	
	private void doMain(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//request.setAttribute("URLCanviContrasenya", Constants.urlCanviContrasenya);
		//request.setAttribute("URLCertificatsDigitals", Constants.pathCertificats);
		RequestDispatcher dispatcher = request.getRequestDispatcher("WEB-INF/JSP/index.jsp");
		dispatcher.forward(request,response);
	
	
	}
}